// pages/demo04/demo04.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
      num:0
  },

  handleInput(e){
    console.log(e.detail.value);
    this.setData({
      num:e.detail.value
    })
  },

  handleTap(e){
      console.log(e);
      //获取自定义属性operation
      const operation=e.currentTarget.dataset.operation;
      this.setData({
        num:this.data.num*1 + operation
      })
  }

})